package uk.ac.lkl.common.associator.ui;



public class AssociationViewLink<S, D> {

    private AssociationViewPanel<S> source;

    private AssociationViewPanel<D> destination;


    public AssociationViewLink(
                               AssociationViewPanel<S> source,
                               AssociationViewPanel<D> destination) {
        this.source = source;
        this.destination = destination;
    }


    public AssociationViewPanel<S> getSource() {
        return source;
    }


    public AssociationViewPanel<D> getDestination() {
        return destination;
    }


    public boolean equals(Object object) {
        if (!(object instanceof AssociationViewLink))
            return false;

        AssociationViewLink other = (AssociationViewLink) object;

        return this.source == other.source
                && this.destination == other.destination;
    }
}
